package com.maiworld.api.controller;

import java.util.Map;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.maiworld.seller.service.EvaluationService;

@RestController
@RequestMapping("eval")

public class EvaluationController {

	@Reference
	private EvaluationService evaluationService;
	
	//(测试通过)
	@RequestMapping("findEval")	
	public Map<String, Object> findEval(String openid,Long sid,Long cid,String status){
		return evaluationService.findEva(openid, sid, cid, status);
		
	}
	//用户提交评论(测试通过)
	@RequestMapping(value="addEvaluation",method=RequestMethod.POST)
	public Map<String, Object> addEvaluation(
			@RequestBody Map<String,String> params
			){
		
		//System.out.print(params);
		
		return evaluationService.addEvaluation(params);
		
	}



}
